home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_00_secretareas.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
3KB
|
88 lines
# Jedi Knight Cog Script
#
# 00_SECRETAREAS.COG
#
# Maximum of 20 Secret areas, triggered upon entering a marked sector
#
# [IS & YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
sector secret0 nolink local
sector secret1 linkid=1
sector secret2 linkid=2
sector secret3 linkid=4
sector secret4 linkid=8
sector secret5 linkid=16
sector secret6 linkid=32
sector secret7 linkid=64
sector secret8 linkid=128
sector secret9 linkid=256
sector secret10 linkid=512
sector secret11 linkid=1024
sector secret12 linkid=2048
sector secret13 linkid=4096
sector secret14 linkid=8192
sector secret15 linkid=16384
sector secret16 linkid=32768
sector secret17 linkid=65536
sector secret18 linkid=131072
sector secret19 linkid=262144
sector secret20 linkid=524288
int player local
int maxSecrets=0 local
int flags=0 local
int i=0 local
sound wav0=Activate01.wav local
message startup
message entered
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
// Total secret areas
for(i=1; i<=20; i=i+1)
{
if(secret0[i] >= 0)
{
maxSecrets = maxSecrets + 1;
}
}
SetInv(player, 70, 0); // set Secrets Found
SetInv(player, 71, maxSecrets); // set Max Secrets on Level
Return;
# ........................................................................................
entered:
// Secret already visited
if (flags & GetSenderID()) Return;
flags = flags | GetSenderId();
// Add one to secret counter
ChangeInv(player, 70, 1.0);
// Print("Entered Secret Area.");
jkPrintUNIString(player, 360);
PlaySoundLocal(wav0, 1.0, 0.0, 0x0);
Return;
end